package twopoint;

public class twopoints {
	double x, y, z;
	public twopoints(double _x, double _y, double _z) {
		x = _x;
		y = _y;
		z = _z;
	}
	public twopoints() {
    }
	public double getDistance(twopoints dest) {
		return Math.sqrt((this.x - dest.x) * (x - dest.x)
				+ (y - dest.y) * (y - dest.y)
				+ (z - dest.z) * (z - dest.z));
				
	}
}
class TestPoint{
	public static void main(String[] args) {
		twopoints origin = new twopoints();
		twopoints dest = new twopoints(5.6, 2.8, 3.9);
		System.out.println(dest.getDistance(origin));
	}
}
